// 属性模块
import request from '@/utils/request'
// GET /admin/product/getCategory1
export const reqCateGory1Id = () => request({
  url: `/admin/product/getCategory1`,
  method: 'get'
})
// GET /admin/product/getCategory2/{category1Id}
export const reqCateGory2Id = (category1Id) => request({
  url: `/admin/product/getCategory2/${category1Id}`,
  method: 'get'
})
// GET   /admin/product/getCategory3/{category2Id}
export const reqCateGory3Id = (category2Id) => request({
  url: `/admin/product/getCategory3/${category2Id}`,
  method: 'get'
})

// 获取商品 GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export const reqCategoryList = (category1Id, category2Id, category3Id) => request({
  url: `/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,
  method: 'get'
})
// 添加属性值  POST /admin/product/saveAttrInfo   
export const reqAddOrUpdate = (data) => request({
  url: '/admin/product/saveAttrInfo',
  method: 'post',
  data
}) 
// {
//   "attrName": "string",
//   "attrValueList": [{
//     "attrId": 0,
//     "id": 0,
//     "valueName": "string"
//   }],
//   "categoryId": 0,
//   "categoryLevel": 0,
//   "id": 0
// }
